home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / Tool Chest / Interfaces / UniversalInterfaces 2.1B1 / CIncludes / CMConversions.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-18  |  4.3 KB  |  126 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        CMConversions.h
  3.  
  4.      Contains:    ColorSync base <-> derived color space conversion Component interface
  5.  
  6.      Version:    Technology:    ColorSync 2.0
  7.                  Package:    Universal Interfaces 2.1ß1 in “MPW Prerelease” on ETO #17
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __CMCONVERSIONS__
  21. #define __CMCONVERSIONS__
  22.  
  23.  
  24. #ifndef __TYPES__
  25. #include <Types.h>
  26. #endif
  27. /*    #include <ConditionalMacros.h>                                */
  28.  
  29. #ifndef __COMPONENTS__
  30. #include <Components.h>
  31. #endif
  32. /*    #include <MixedMode.h>                                        */
  33.  
  34. #ifndef __CMAPPLICATION__
  35. #include <CMApplication.h>
  36. #endif
  37. /*    #include <Quickdraw.h>                                        */
  38. /*        #include <QuickdrawText.h>                                */
  39. /*    #include <Files.h>                                            */
  40. /*        #include <OSUtils.h>                                    */
  41. /*            #include <Memory.h>                                    */
  42. /*    #include <Printing.h>                                        */
  43. /*        #include <Errors.h>                                        */
  44. /*        #include <Dialogs.h>                                    */
  45. /*            #include <Windows.h>                                */
  46. /*                #include <Events.h>                                */
  47. /*                #include <Controls.h>                            */
  48. /*                    #include <Menus.h>                            */
  49. /*            #include <TextEdit.h>                                */
  50. /*    #include <CMICCProfile.h>                                    */
  51.  
  52. #ifdef __cplusplus
  53. extern "C" {
  54. #endif
  55.  
  56. #if PRAGMA_ALIGN_SUPPORTED
  57. #pragma options align=mac68k
  58. #endif
  59.  
  60. #if PRAGMA_IMPORT_SUPPORTED
  61. #pragma import on
  62. #endif
  63.  
  64.  
  65. enum {
  66.     CMConversionInterfaceVersion = 1
  67. };
  68.  
  69. /* Component function selectors */
  70. enum {
  71.     kCMXYZToLab                    = 0,
  72.     kCMLabToXYZ                    = 1,
  73.     kCMXYZToLuv                    = 2,
  74.     kCMLuvToXYZ                    = 3,
  75.     kCMXYZToYxy                    = 4,
  76.     kCMYxyToXYZ                    = 5,
  77.     kCMRGBToHLS                    = 6,
  78.     kCMHLSToRGB                    = 7,
  79.     kCMRGBToHSV                    = 8,
  80.     kCMHSVToRGB                    = 9,
  81.     kCMRGBToGRAY                = 10,
  82.     kCMXYZToFixedXYZ            = 11,
  83.     kCMFixedXYZToXYZ            = 12
  84. };
  85.  
  86. extern pascal ComponentResult CMXYZToLab(ComponentInstance ci, const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  87.  FIVEWORDINLINE(0x2F3C, 16, 0, 0x7000, 0xA82A);
  88. extern pascal ComponentResult CMLabToXYZ(ComponentInstance ci, const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  89.  FIVEWORDINLINE(0x2F3C, 16, 1, 0x7000, 0xA82A);
  90. extern pascal ComponentResult CMXYZToLuv(ComponentInstance ci, const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  91.  FIVEWORDINLINE(0x2F3C, 16, 2, 0x7000, 0xA82A);
  92. extern pascal ComponentResult CMLuvToXYZ(ComponentInstance ci, const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  93.  FIVEWORDINLINE(0x2F3C, 16, 3, 0x7000, 0xA82A);
  94. extern pascal ComponentResult CMXYZToYxy(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  95.  FIVEWORDINLINE(0x2F3C, 12, 4, 0x7000, 0xA82A);
  96. extern pascal ComponentResult CMYxyToXYZ(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  97.  FIVEWORDINLINE(0x2F3C, 12, 5, 0x7000, 0xA82A);
  98. extern pascal ComponentResult CMRGBToHLS(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  99.  FIVEWORDINLINE(0x2F3C, 12, 6, 0x7000, 0xA82A);
  100. extern pascal ComponentResult CMHLSToRGB(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  101.  FIVEWORDINLINE(0x2F3C, 12, 7, 0x7000, 0xA82A);
  102. extern pascal ComponentResult CMRGBToHSV(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  103.  FIVEWORDINLINE(0x2F3C, 12, 8, 0x7000, 0xA82A);
  104. extern pascal ComponentResult CMHSVToRGB(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  105.  FIVEWORDINLINE(0x2F3C, 12, 9, 0x7000, 0xA82A);
  106. extern pascal ComponentResult CMRGBToGray(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  107.  FIVEWORDINLINE(0x2F3C, 12, 10, 0x7000, 0xA82A);
  108. extern pascal ComponentResult CMXYZToFixedXYZ(ComponentInstance ci, const CMXYZColor *src, CMFixedXYZColor *dst, unsigned long count)
  109.  FIVEWORDINLINE(0x2F3C, 12, 11, 0x7000, 0xA82A);
  110. extern pascal ComponentResult CMFixedXYZToXYZ(ComponentInstance ci, const CMFixedXYZColor *src, CMXYZColor *dst, unsigned long count)
  111.  FIVEWORDINLINE(0x2F3C, 12, 12, 0x7000, 0xA82A);
  112.  
  113. #if PRAGMA_IMPORT_SUPPORTED
  114. #pragma import off
  115. #endif
  116.  
  117. #if PRAGMA_ALIGN_SUPPORTED
  118. #pragma options align=reset
  119. #endif
  120.  
  121. #ifdef __cplusplus
  122. }
  123. #endif
  124.  
  125. #endif /* __CMCONVERSIONS__ */
  126.